/*
C. Number Game
cf_20_6_20_1370C
*/
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int check(int x)
{
	for(int i = 2;i*i<=x;i++)
	{
		if(x%i==0) return 0;
	}
	return 1;
}
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n;
		scanf("%d",&n);
		int tmp = n;
		if(n==1) printf("FastestFinger\n");
		else if(n==2) printf("Ashishgup\n");
		else if(n%2) printf("Ashishgup\n");
		else 
		{
			while(n%2==0) n = n/2;
			if(n==1)
			{
				printf("FastestFinger\n");
				continue;
			}
			if(tmp%4==0)
			{
				printf("Ashishgup\n");
				continue;
			}
			if(check(n))
			{
				printf("FastestFinger\n");
				continue;
			}
			puts("Ashishgup");
		}
	}
}
